package org.orz.story.gateway.clients;

import org.orz.cloud.common.result.ResultDTO;
import org.orz.story.pms.api.AccountAuthClient;
import org.orz.story.pms.api.model.dto.DoAuthDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class PmsClient {

    @Autowired
    private AccountAuthClient accountAuthClient;

    /**
     * 用户认证+授权
     */
    public ResultDTO doAuth(String path, String workbench, String token){
        DoAuthDto dto = new DoAuthDto();
        dto.setUrl(path);
        dto.setWorkbench(workbench);
        dto.setToken(token);
        return accountAuthClient.doAuth(dto);
    }
}
